
package com.windgo.mapper;

import com.windgo.bean.MarketOrder;
import com.windgo.bean.MarketOrderExample;
import com.windgo.bean.MarketOrderHandleOption;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.HashMap;
import java.util.List;

public interface MarketOrderMapper {
    int countCommentsNull(Short comments);
    int countPayIdNull(String payId);
    int countShipSnNull();
    int countConfirmTimeNull(Date confirmTime);
    long countByExample(MarketOrderExample example);

    int deleteByExample(MarketOrderExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(MarketOrder row);

    int insertSelective(MarketOrder row);

    List<MarketOrder> selectByExample(MarketOrderExample example);

    MarketOrder selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("row") MarketOrder row, @Param("example") MarketOrderExample example);

    int updateByExample(@Param("row") MarketOrder row, @Param("example") MarketOrderExample example);

    int updateByPrimaryKeySelective(MarketOrder row);

    int updateByPrimaryKey(MarketOrder row);

    //新建了一个表：market_order_handleoption,去这个表中获取option操作信息
    MarketOrderHandleOption selectAllHandlerOption(@Param("status") Short orderStatus);

    List<MarketOrder> selectAllOrders();


    int selectCouponUserIdByOrderId(@Param("orderId") Integer orderId);

    int countUnReceive(@Param("low") Integer lowStatusTwo, @Param("top") Integer topStatusTwo,@Param("userId") Integer userId);

    List<Integer> countComments(@Param("userId") Integer userId);

}